import java.util.Arrays;

public class No_01_Validator {

    public static void main(String[] args) {
        System.out.println(Arrays.toString(randomArray(10, 1, 2)));
    }

    // 范围 [min, max]
    public static int[] randomArray(int size, int min, int max) {
        int[] arr = new int[size];
        for (int i = 0; i < size; i++) {
            arr[i] = (int) (Math.random() * (max - min + 1)) + min;
        }
        return arr;
    }

    public static boolean sameArray(int[] arr1, int[] arr2) {
        if (arr1.length != arr2.length) {
            return false;
        }
        for (int i = 0; i < arr1.length; i++) {
            if (arr1[i] != arr2[i]) {
                return false;
            }
        }
        return true;
    }

}
